//
//  LiveTableViewCell.m
//  movement
//
//  Created by lanou on 16/5/11.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "LiveTableViewCell.h"
#import <UIImageView+WebCache.h>

@interface LiveTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UIImageView *image1;
@property (weak, nonatomic) IBOutlet UILabel *player1;
@property (weak, nonatomic) IBOutlet UILabel *scoreLabel;
@property (weak, nonatomic) IBOutlet UIImageView *image2;
@property (weak, nonatomic) IBOutlet UILabel *player2;
@property (weak, nonatomic) IBOutlet UILabel *label1;

@end

@implementation LiveTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setDataWithModel:(LiveModel *)model {
    self.timeLabel.text = model.time;
    self.player1.text = model.player1;
    self.player2.text = model.player2;
    [self.image1 sd_setImageWithURL:[NSURL URLWithString:model.player1logo]];
    [self.image2 sd_setImageWithURL:[NSURL URLWithString:model.player2logo]];
    if ([model.status  isEqual: @"0"]) {
        self.label1.text = @" ";
        self.scoreLabel.text = @"未开赛";
    } else if ([model.status isEqual:@"1"]) {
        self.label1.text = @"直播中";
        self.scoreLabel.text = model.score;
    } else {
        self.label1.text = @" ";
        self.scoreLabel.text = model.score;
    }
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
